package helper

import (
	"io"
)
import "github.com/imroc/req/v3"


func Lyric(id int) string {
	e3xdata := App.Lyric(id)
	do, err := req.C().R().
		SetHeaderNonCanonical("Content-Type", "application/x-www-form-urlencoded"). // Set one header
		SetHeader("user-agent", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36").
		SetBody(e3xdata).
		Post("https://music.163.com/weapi/song/lyric?csrf_token=")
	defer func(Body io.ReadCloser) {
		_ = Body.Close()
	}(do.Body)
	all, err := io.ReadAll(do.Body)
	if err != nil {
		return ""
	}
	// lrc    -> lyric
	// tlyric -> lyric
	return string(all)
}
